package com.software.practicecenter.controller;

import com.mysql.cj.x.protobuf.MysqlxCrud;
import com.software.practicecenter.entity.KnowledgePoint;
import com.software.practicecenter.service.KnowledgePointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.util.Collection;
import java.util.List;

/**
 * @Author xiaoliao
 * @Date 2023/5/31 15:14
 */
@RestController
@RequestMapping("/knowledge_point")
@RefreshScope
public class KnowledgePointController {
   @Autowired
   private KnowledgePointService knowledgePointService;

   @GetMapping("/findKnowledgePointById/{id}")
   public KnowledgePoint findKnowledgePointById (@PathVariable String id) {
       return knowledgePointService.findKnowledgePointById(id);
   }

    @RequestMapping("/findByIdIn")
    public List<KnowledgePoint> findByIdIn (@RequestBody Collection<String> ids) {
        return knowledgePointService.findByIdIn(ids);
    }
}
